import MySQLdb
import json
from common import getConnection, _process_unicode
import unicodedata

def GetInfoTeam(IDTeam):
	#conn = MySQLdb.connect(host = "localhost",user = "root",passwd = "",db = "crawler_football")
	query = 'select * from Teams where ID_Team = ' + str(IDTeam)

	conn = getConnection()
	cur = conn.cursor()
	cur.execute(query)	
	row = cur.fetchone()
	while row is not None:
		info = {}
		info['ID_Team'] = row[0]
		info['nameTeam'] = _process_unicode(row[1])	
		info['logoUrl'] = row[2]	
		row = cur.fetchone()
	cur.close()
	conn.close()
	return info	
        return u

